<template>
  <div v-if="system" class="system-metrics-page-page-wrapper">系统指标</div>
</template>

<script lang="ts" setup>
import { useSystemService } from '@/service/system-service';
import { System } from '@/store/system-repository';

const route = useRoute();
const systemService = useSystemService();

const system = ref<System>();
watch(
  () => {
    return route.params.systemId as string | undefined;
  },
  newSystemId => {
    if (newSystemId) {
      systemService.system(newSystemId).then(data => {
        system.value = data;
      });
    }
  },
  { immediate: true },
);
</script>

<style lang="less" scoped>
.system-architecture-page-wrapper {
  height: 100%;
}
</style>
